Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@tiptap/extension-blockquote
Advanced tools
@tiptap/extension-blockquote is an extension for the Tiptap editor that allows users to easily add and manage blockquotes within their rich text content. It provides a simple way to include blockquote formatting, making it easier to highlight quotes or important text in a visually distinct manner.
Adding a Blockquote
This code demonstrates how to add the Blockquote extension to a Tiptap editor instance and toggle a blockquote in the editor content.
import { Blockquote } from '@tiptap/extension-blockquote';
import { Editor } from '@tiptap/core';
const editor = new Editor({
extensions: [
Blockquote,
],
content: '<p>Hello World!</p>',
});
editor.chain().focus().toggleBlockquote().run();
Customizing Blockquote Styling
This code shows how to extend the Blockquote extension to add custom styling attributes and apply custom CSS to the blockquote element.
import { Blockquote } from '@tiptap/extension-blockquote';
import { Editor } from '@tiptap/core';
import { css } from 'styled-components';
const CustomBlockquote = Blockquote.extend({
addAttributes() {
return {
class: {
default: 'custom-blockquote',
},
};
},
});
const editor = new Editor({
extensions: [
CustomBlockquote,
],
content: '<p>Hello World!</p>',
});
const styles = css`
.custom-blockquote {
border-left: 4px solid #ccc;
padding-left: 16px;
color: #666;
}
`;
editor.chain().focus().toggleBlockquote().run();
The prosemirror-schema-basic package provides a basic schema for ProseMirror, including blockquote functionality. It is more low-level compared to @tiptap/extension-blockquote and requires more manual setup and configuration.
Quill is a rich text editor that includes built-in support for blockquotes. It provides a more comprehensive editor experience with a wide range of formatting options, including blockquotes, but may be more heavyweight compared to the focused functionality of @tiptap/extension-blockquote.
Tiptap is a headless wrapper around ProseMirror – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as New York Times, The Guardian or Atlassian.
Documentation can be found on the Tiptap website.
Tiptap is open sourced software licensed under the MIT license.
FAQs
blockquote extension for tiptap
The npm package @tiptap/extension-blockquote receives a total of 814,803 weekly downloads. As such, @tiptap/extension-blockquote popularity was classified as popular.
We found that @tiptap/extension-blockquote demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.